﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace $safeprojectname$
{
    class Program
    {
        static void Main(string[] args)
        {
            //加载配置文件
            NFinal.Config.Configration.Init();
            string url = null;
            if (NFinal.Config.Configration.globalConfig.debug.enable)
            {
                url = NFinal.Config.Configration.globalConfig.debug.url;
            }
            else
            {
                url = NFinal.Config.Configration.globalConfig.server.url;
            }
            using (Microsoft.Owin.Hosting.WebApp.Start<$safeprojectname$.Startup>(url))
            {
                Console.WriteLine("服务器已经启动");
                if (NFinal.Config.Configration.globalConfig.debug.enable)
                {
                    System.Diagnostics.Process.Start("explorer.exe", url);
                }
                Console.ReadKey();
            }
        }
    }
}
